package com.xxzuibang.day16.biginteger类;

import java.math.BigInteger;

public class BigInteger_ {
    public static void main(String[] args) {
        BigInteger bigInteger=new BigInteger("999999999999999999999");
        BigInteger bigInteger1=new BigInteger("99999999999999999999999999999999999999999999999999999999999");
        System.out.println(bigInteger);//999999999999999999999
        //add加
        BigInteger add=bigInteger.add(bigInteger1);
        System.out.println(add);//100000000000000000000000000000000000000999999999999999999998
        //substract减
        BigInteger substract=bigInteger.subtract(bigInteger1);
        System.out.println(substract);//-99999999999999999999999999999999999999000000000000000000000
        //multiply乘
        BigInteger multiply=bigInteger.multiply(bigInteger1);
        System.out.println(multiply);//99999999999999999999899999999999999999999999999999999999999000000000000000000001
        //divide除
        BigInteger divide=bigInteger.divide(bigInteger1);
        System.out.println(divide);//0
    }
}
